<?php

class OOWP_Element_Body
    extends OOWP_Element
{

    public function __construct(array $args = array( ))
    {
        $input = $this->merge_arguments(array(
            'attributes' => array( ),
            'contents' => array( ),
            'container_decorator' => null,
            'contents_decorator' => null,
            'void' => false,
            'tag' => 'body',
        ), $args);

        parent::__construct($input);
    }

    protected function filter_element_class(array $pieces) {
        ob_start();
        body_class( );
        $capture = ob_get_contents();
        ob_end_clean();

        $capture = str_replace('"', '', $capture);
        $capture = str_replace('class=', '', $capture);
        $capture = explode(' ', $capture);

        return array_merge($pieces, $capture);
    }

    protected function filter_element_contents_objects(array $objects)
    {
        $objects[ ] = new OOWP_Atom_WP('footer');
        return $objects;
    }

}
